﻿CREATE PROCEDURE [ServiceEngine].[ListRuntimeServerNotificationAddresses]
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as RuntimeServerID, N.[EntityName] as [Name], 
		R.NotificationURI, R.NotificationBindingID
	FROM	[ServiceEngine].Names N 
		INNER JOIN [ServiceEngine].RuntimeServers R ON N.EntityID = R.RuntimeServerID
 		INNER JOIN [ServiceEngine].Bindings B ON R.NotificationBindingID = B.BindingID
	WHERE	N.[EntityTypeID] = 0 AND R.ReceiveNotifications = 1
END


